import React from 'react';
import {render, } from 'react-dom';
import HtmlIndex from './index';

export interface Interface {
  html: string;
  className: string;
  id: string;
}

export default class HtmlTemp extends HtmlIndex {

  renderItem({jsxHtml, className, ...domProperty}: Interface) {

    const $container = React.createElement('div', {
      className: className,
      ...domProperty
    }, [jsxHtml])

    return $container
  }

  // @ts-ignore
  initInstance(module: any, option: any) {
    render(this.renderItem(option), this.box);
    return {};
  }
}

/**
 * 配置模板
 */
const configTemp = {
  option: {
    jsxHtml: '',
  }
}
export {configTemp};
